import request from '@/utils/request'

const api = {
    auditPurchase: '/purchaseOrder/audit',
    auditSale: '/sale/audit',
    auditRejectSale: '/reject/auditRejectSale'
}

export function auditPurchase (parameter) {
  return request({
    url: api.auditPurchase,
    method: 'put',
    params: {
      code: parameter.code,
      signal: parameter.signal,
      auditRemark: parameter.auditRemark
    }
  })
}

export function auditSale (parameter) {
  return request({
    url: api.auditSale,
    method: 'put',
    params: {
      code: parameter.code,
      signal: parameter.signal,
      auditRemark: parameter.auditRemark
    }
  })
}

export function auditRejectSale (parameter) {
  return request({
    url: api.auditRejectSale,
    method: 'put',
    params: {
      code: parameter.code,
      signal: parameter.signal,
      auditRemark: parameter.auditRemark
    }
  })
}
